<?PHP

namespace App\Http\Services;

use App\Http\Services\KafkaService;

class ProduceService
{
    public function produce()
    {
        $topic = env('KAFKA_TOPIC'); //配置在env中
        $url = env('KAFKA_URL'); //配置在env中

        $value = 'atguigu';
        $kafka = new KafkaService();
        $kafka->Producer($topic, $value, $url);



    }
}
